; 100410-100800
; - 100410-1004xx = write guncon hooks
; - 100600-100800 = guncon pad code



org $801001f4

j $80100410
nop



; copy guncon --> justifier pad code
lui t0,$8010
ori t0,t0,$0600
lui t1,$8002
ori t1,t1,$28ec

ori t2,r0,$100


COPY_CODE1:
lw a0,$0(t0)
addi t2,t2,$fffc
sw a0,$0(t1)

addiu t0,t0,4
bne t2,r0,COPY_CODE1
addiu t1,t1,4



; install jmp hooks
lui t0,$8002


; #1 - guncon data
lui t1,$0800
ori t1,t1,$8a3b
sw t1,$2ad4(t0)
sw r0,$2ad8(t0)


; #2 - offscreen shot
ori t1,r0,$1000
sh t1,$28e6(t0)


; #3 - guncon detection
ori t1,r0,$0060
sh t1,$22704(t0)

; ================================
; ================================
; ================================

DONE:

; OLD code
lw v0,$10(v0)
nop

j $801001fc
nop
